<template>
  <div v-if="flex" :style="{ width: width + 'px', flex: flex}" class="tree-column">
    <slot/>
  </div>
  <div v-else :style="{ width: width + 'px'}" class="tree-column">
    <slot/>
  </div>
</template>
<script>
export default {
  name: 'Column',
  props: {
    width: Number,
    field: String,
    label: String,
    flex: Number
  },
  data() {
    return {
      open: false
    }
  }
}
</script>
<style>
  .tree-column{
    padding: 0px 4px;
    min-width: 60px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
</style>
